package utils;

import java.io.Serializable;

import org.apache.commons.codec.digest.DigestUtils;
public class DigestUtil implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	public static String md5(String text) {
		if(StringUtil.isEmpty(text)){
			return "";
		}
		return DigestUtils.md5Hex(text);
	}
	
	public static String sha256(String text) {
		if(StringUtil.isEmpty(text)){
			return "";
		}
		return DigestUtils.sha256Hex(text);
	}
	
	public static void main(String[] args) throws Exception{
		System.out.println(md5(null));
		System.out.println(sha256("2.0.177770076108511.26000077777777"));
	}
}